﻿using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using UnityEngine;
using UnityEngine.Analytics;
using UnityEngine.SceneManagement;
public class JudgeIsFirst : MonoBehaviour
{
    public GameObject Notice;
    AsyncOperation asyncLoad;
    // Start is called before the first frame update
    private void Awake()
    {
#if UNITY_EDITOR
        //PlayerPrefs.DeleteAll();
#endif

    }
    void Start()
    {
        asyncLoad = SceneManager.LoadSceneAsync(1);
        asyncLoad.allowSceneActivation = false;
        if (PlayerPrefs.HasKey("isFirst"))
        {
            asyncLoad.allowSceneActivation = true;
        }
        else
        {
            Notice.SetActive(true);
        }
    }
    public void SetFirst()
    {
        PlayerPrefs.SetInt("isFirst", 1);
        asyncLoad.allowSceneActivation = true;
    }
    public void Quit()
    {
        AdManager.Instance.Quit();
    }
}
